<template>
  <div class="baseIntro-module">
    <div class="module-title">
      <span>自我介绍</span>
      <i class=" jl_font">&#xe623;</i>
    </div>
    <div class="edit-box">
      <div class="clearfix">
        <el-row :gutter="10">
          <el-col :span="24">
            <div class="form_groun">
              <label class="label right">自我介绍</label>
              <el-input @change="changeBaseIntro" :value="value" type="textarea" :rows="8" placeholder="请简要的描述一下你自己"></el-input>
            </div>
          </el-col>
        </el-row>
        <el-row :gutter='10'>
          <el-col :span="24">
            <el-button type="primary" @click="submitForm">保存</el-button>
          </el-col>
        </el-row>
      </div>
    </div>
  </div>
</template>
<script>
import { saveResumeBaseIntro } from 'api'
export default {
  props: {
    value: {
      type: String,
      default:""
    }
  },
  data() {
    return {
      type: 'baseIntro',
      ceshi:this.value
    }
  },
  mounted() {
    console.log('进入baseIntro');
  },
  methods: {
    changeBaseIntro(str){
      this.$emit('updateDataStr',{
        type:this.type,
        val:str
      })
    },
    submitForm() {
      this.$promise.post(saveResumeBaseIntro, {
        baseIntro:this.value
      }).then(resp => {
        if (resp.status == 1) {
          this.$message({
            message: '保存成功',
            type: 'success'
          });
        }
      })
    }
  }
}
</script>

<style lang="scss" scoped>
.baseIntro-module {
  background: #fff;
  color: #000;
}
</style>

